<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class WeChatUser extends Model
{
    protected $table = 'wechat_users';

    protected $fillable = [
    	'openid',
    	'nickname',
    	'sex',
    	'city',
    	'province',
    	'remark',
    	'groupid',
        'headimgurl',
        'country',
        'subscribe',
        'form_openid'
    ];


    public function wechatUserInfo(){
        return $this->hasOne('App\Models\WeChatUserInfo', 'wechat_user_id');
    }

    public function wechatDoctor(){
        return $this->hasOne('App\Models\WeChatDoctor','openid','form_openid');
    }
}
